{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="{% static 'plugins/bootstrap/css/bootstrap.css' %}">
    <style>
        .box {
            width: 480px;
            border: 1px solid #ddd;
            margin-right: auto;
            margin-left: auto;
            margin-top: 100px;
            padding-right: 40px;
            padding-left: 40px;
            padding-bottom: 40px;
            box-shadow: 5px 10px 10px rgb(0, 0, 0, .5);
        }
    </style>
</head>
<body>
<div class="box">
    <h1 style="text-align: center">用户登录</h1>
    {#可以不写action，因为默认会提交哦啊当前页面#}
    {#<form method="post" action="/login/">#}
    <form method="post" novalidate>
        {% csrf_token %}
        {% for field in form %}
            <div class="form-group" style="position: relative;margin-bottom: 25px">
                {{ field.label }}
                {{ field }}
                <span style="position: absolute;color: red">{{ field.errors.0 }}</span>
            </div>
        {% endfor %}

        <input type="submit" class="btn btn-primary" value="登录">
        {#        <button type="button" class="btn btn-primary">登录</button>#}
        <a href="{% url 'sms_login' %}" style="float: right">短信登陆</a>
    </form>
</div>
</body>
</html>